<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var person1 = {
      toLocaleString: function () {
        return "locale1";
      },
      toString: function () {
        return "string1";
      }
    }
    var person2 = {
      toLocaleString: function () {
        return "locale2";
      },
      toString: function () {
        return "string2";
      }
    }

    var people = [person1, person2, null];
    console.log(people.valueOf());
    console.log(people.toString());
    console.log(people.toLocaleString());

    console.log(people.join('*'));
    console.log(people.valueOf().join('\\'));
    console.log(people.toLocaleString().join('/'));
  </script>
</body>

</html>